import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  //auth是否需要登陆后才可以展示，默认为false
  //keepAlive 是否缓存当前页
  {
    path: '/',
    name: 'map',
    component: () => import('../views/map.vue'),
    meta: { title: '地图', keepAlive: false, meta: true,auth:true }
  },
]

const router = new VueRouter({
  routes,
  scrollBehavior: () => ({ y: 0 })
})

export default router
